<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="zh-CN">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<?php
error_reporting(7);
session_start();
if($_GET[out])
{
	unset ($_SESSION[id]);
	unset ($_SESSION[pass]);
}
if($_POST[name]&&$_POST[password])
{
    $_SESSION[id]=$_POST[name];
    $_SESSION[pass]=$_POST[password];
}
if($_SESSION[id]&&$_SESSION[pass])
{
	echo "登陆成功<br>用户名：".$_SESSION[id]."<br>密码：".$_SESSION[pass];
	echo "<br><a href='test_for_everything.php?out=out'>退出</a>";
}
?>
<form action="" method="post">
用户ID：
<input type="text" name="name"><br><br>
密码：
<input type="password" name="password"><br><br>
<input type='submit' value="登陆">
</form>